<div class="bjui-pageHeader">
<form action="{:U('createBarterOrder')}" id="j_form_form" class="pageForm" data-toggle="validate">
    <table class="table table-bordered tbl_create">
         <tr>
                <td><div> 售后记录号：<span id="lblSaleAfterRecordNo" style="font-weight:normal;">{$service_info.service_sn}</span></div></td>
                <td> 售后状态：<span id="lblSaleAfterStatus" style="font-weight:normal;">{$service_info.after_sales_status}</span> </td>
              </tr>
              <tr>
                <td><div> 系统订单号：<span id="lbl_OrderId" style="font-weight:normal;">{$service_info.order_no}</span></div></td>
                <td> 网店单号：<span id="lbl_Order_No" style="font-weight:normal;">{$service_info.order_sn}</span> </td>
              </tr>
              <tr>
                <td><div 发货时间：<span id="lblCreateTime" style="font-weight:normal;">{:date('Y-m-d H:i:s', $service_info['outbound_sn_time'])}</span></div></td>
                <td> 最后更新时间：<span id="lblLastUpdateTime" style="font-weight:normal;">{:date('Y-m-d H:i:s', $service_info['time'])}</span> </td>
              </tr>
              <tr>
                <td><div> 责任方：<span id="lblSaleAfterType" style="font-weight:normal;">{$service_info.responsible_party}</div></td>
                <td> 出库单号：<span id="lbl_SsoBillNo" style="font-weight:normal;">{$service_info.outbound_sn}</span> </td>
              </tr>
			   <tr>
                <td><div> 换货原因：<span id="lblSaleAfterType" style="font-weight:normal;">{$service_info.return_reason}</div></td>
                <td> 换货详情：<span id="lbl_SsoBillNo" style="font-weight:normal;">{$service_info.details}</span> </td>
              </tr>
			  <tr>
                <td colspan="2" style="padding: 20px;">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="Main_List_Table" style="font-weight: normal;" rules="none">
                      <tbody>
                        <tr class="Main_List_Table_Tr1">
                          <td width="25%"> 换货商品名称 </td>
                          <td width="15%"> 商品货号 </td>
                          <td width="20%"> 颜色/规格<br>
                            条码 </td>
                          <td width="15%"> 售后数量 </td>
						  <td width="15%"> 操作 </td>
                        </tr>
                        <notempty name="service_goods_list">
                          <volist name="service_goods_list" id="goods">
                            <tr onMouseOver="this.className='Main_List_Table_Tr_Over'" onMouseOut="this.className='Main_List_Table_Tr_Out'" class="Main_List_Table_Tr_Out">
                              <td> {$goods.name} </td>
                              <td> {$goods.sn}</td>
                              <td> 颜色：{$goods.color_name}，规格：{$goods.spec_name}<br>
                                {$goods.bar_code} </td>
                              <td> {$goods.return_num} </td>
							  <td> <if condition="$goods.barter_bar_code_id eq '0'"> <!--<a data-title="订单管理-添加商品" data-mask="true" data-id="dialog-addGoods" data-height="400"
                                   data-width="800" data-toggle="dialog" class="btn btn-red"
                                   href="{:U('AfterSales/ajaxBarCodeSearch?service_sn='.$service_info['service_sn'].'&orderGoodsId='.$goods['order_goods_id'])}">添加商品</a> -->
								   <a data-title="订单管理-添加商品" data-mask="true" data-id="dialog-addGoods" data-height="400"
                                   data-width="800" data-toggle="dialog" class="btn btn-red"
                                   href="{:U('AfterSales/searchGoods?service_sn='.$service_info['service_sn'].'&orderGoodsId='.$goods['order_goods_id'])}">添加商品</a> 
								   <else />
								    商品已添加
								   </if>
								   </td>
                            </tr>
                          </volist>
                        </notempty>
                      </tbody>
                    </table>
                  </td>
              </tr>
			  <if condition="$barter_goods neq ''">
			  <tr>
                <td colspan="2" class="aaa" style="padding: 20px;">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="Main_List_Table" style="font-weight: normal;" rules="none">
                      <tbody>
                        <tr class="Main_List_Table_Tr1">
                          <td width="25%"> 生成换货单商品 </td>
                          <td width="15%"> 生成换货单商品货号 </td>
                          <td width="20%"> 颜色/规格<br>
                            条码 </td>
                          <td width="15%"> 换货数量 </td>
						  <td width="15%"> 操作 </td>
                        </tr>
                        <notempty name="barter_goods">
                          <volist name="barter_goods" id="goods">
                            <tr onMouseOver="this.className='Main_List_Table_Tr_Over'" onMouseOut="this.className='Main_List_Table_Tr_Out'" class="Main_List_Table_Tr_Out">
                              <td> {$goods.name} </td>
                              <td> {$goods.sn}</td>
                              <td> 颜色：{$goods.color_name}，规格：{$goods.spec_name}<br>
                                {$goods.bar_code} </td>
                              <td> {$goods.return_num} </td>
							  <td> <a type="button" class="btn btn-red" href="{:U('AfterSales/delgoods?service_sn='.$service_info['service_sn'].'&orderGoodsId='.$goods['order_goods_id'].'&navTabId=CO'.$service_info['service_sn'])}"  data-toggle="doajax" data-confirm-msg="确认删除该商品？" >删除商品</a> </td>
                            </tr>
                          </volist>
                        </notempty>
                      </tbody>
                    </table>
                  </td>
              </tr>
			  <tr>
			  	<td><span>收货人:</span><input type="text" class="name_txt" name="user_name" value="{$service_info.user_name}" /></td>
				<td><span>手机一:</span><input type="text" class="phone1_txt" name="mobile_phone" value="{$service_info.mobile_phone}" /></td>
              </tr>
			  <tr>
			  	<td><span><span>电&nbsp;&nbsp;&nbsp;话:</span><input type="text" class="phone_txt" name="home_phone" value="{$service_info.home_phone}" /></td>
				<td><span>手机二:</span><input type="text" class="phone2_txt"  name="mobile_phone2"  value="{$service_info.mobile_phone2}"/></td>
			  </tr>
			  <tr>
			  	<td><span>地&nbsp;&nbsp;&nbsp;址:</span><input type="text" class="addr_txt" name="address"  value="{$service_info.address}"/></td>
				<td><span>邮&nbsp;&nbsp;&nbsp;编:</span><input type="text" class="addr_txt" name="zip_code"  value="{$service_info.zip_code}"/></td>
			  </tr>
			  <tr>
			  	<td><span>快&nbsp;&nbsp;&nbsp;递:</span>
                        <select name="express_id" data-toggle="selectpicker" data-rule="required">
                          <option value="">请选择快递</option>
                          <?php foreach($expressList as $express):?>
                          <option value="{$express.id}" <?php echo $service_info['express_id']==$express['id'] ? "selected='true'" : "";?>>{$express.name}</option>
                          <?php endforeach;?>
                        </select>
				</td>
				<td>
					<span>销售客服：</span>
                        <select name="seller_id" data-toggle="selectpicker" data-rule="required">
                            <option value="">{$groupTitle}</option>
                            <?php foreach($memberGroup as $member):?>
                            <option value="{$member.uid}"
                            <?php echo $service_info['seller_id']==$member['uid'] ? "selected='true'" :'';?>
                            >{$member.username}</option>
                            <?php endforeach;?>
                        </select>
					<input type="hidden" name="service_sn" value="{$service_info.service_sn}">
				</td>
			  </tr>
			  <tr>
			  	<td  colspan="2" align="right"><button type="submit" class="btn-blue" data-icon="save">生成订单</button></td>
			  </tr>
			  </if>
    </table>
	</form>
</div>
<style>
.tbl_create tr td{
	padding-left:20px;
}
</style>